{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=3175
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,n,k,l,r,j:longint;
	a:array[0..100010] of char;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
fillchar(a,sizeof(a),'I');
read(n,k);
for i:=1 to k do begin
	read(l,r);
	for j:=l to r do
		a[j]:='.';
end;
for i:=1 to n do
	write(a[i]);
end.